aux_source_directory(. inc)
aux_source_directory(src src)

add_library(sqlserver SHARED
        ${inc}
        ${src}
        )

set(connector_lib
        ${PROJECT_SOURCE_DIR}/thrid-party/connector/lib64/libmysqlcppconn.so
        ${PROJECT_SOURCE_DIR}/thrid-party/connector/lib64/libmysqlcppconn.so.9)

file(COPY ${connector_lib} DESTINATION ${PROJECT_BINARY_DIR}/lib64)

target_link_directories(sqlserver PUBLIC ${PROJECT_BINARY_DIR}/lib64)

target_link_libraries(sqlserver PUBLIC
        mysqlcppconn
        logger)

target_include_directories(sqlserver PUBLIC

        .
        ${PROJECT_SOURCE_DIR}/thrid-party/connector/include)